<template>
    <div class="tabbar-container">
      <h1>管理中心</h1>
      <div class="right-actions">
        <!-- <el-button size="small" icon="Refresh"  @click="updateRefsh">刷新</el-button> -->
        <el-button size="small" icon="FullScreen" @click="fullScreen">全屏</el-button>
        <el-button size="small" icon="User" @click="goBack">返回</el-button>
      </div>
    </div>
  </template>
  
  <script setup lang="ts">
  import {useRouter} from 'vue-router'
    //获取用户相关小仓库
  import useUserStore from '@/store/modules/user';
  
  //获取骨架的小仓库
  import useLayOutSettingStore from '@/store/modules/setting';
  import { nextTick } from 'vue';
  let layoutSettingStore = useLayOutSettingStore()
  let userStore = useUserStore()
  //获取路由器对象
  let $router = useRouter()
  // //刷新按钮点击回
  // const updateRefsh = ()=>{
  //   layoutSettingStore.refsh = !layoutSettingStore.refsh
  // }
  //全屏按钮点击回调
  const fullScreen = ()=>{
    //DOM对象的一个属性：可以用来判断当前是不是全屏模式{全屏：true，不是全屏：false}
    let full = document.fullscreenElement
    //切换为全屏模式
    if(!full){
      //文档根节点的方法requestFullscreen实现全屏模式
      document.documentElement.requestFullscreen()
    }else{
      //退出全屏
      document.exitFullscreen()
    }
  }
  const goBack = () => {
    $router.push({path:'/'})
  }
  
  </script>
  <script lang="ts">
  export default {
    name: "Tabbar2"
  }
  </script>
    
  
  <style lang="scss" scoped>
  .tabbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    background-color: #000000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    
    .nav-buttons {
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 1;
      margin: 0 40px;
      gap: 20px;
      
      .el-button {
        font-size: 14px;
        font-weight: 500;
        padding: 0;
        border-radius: 50%;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        color: #ffffff;
        background-color: transparent;
        border-color: rgba(255, 255, 255, 0.2);
        margin: 0 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        
        :deep(.el-icon) {
          font-size: 18px;
        }
        
        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
          background-color: rgba(255, 255, 255, 0.05);
          border-color: rgba(255, 255, 255, 0.4);
        }
      }
    }
    
    .right-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      
      .el-button {
        color: #ffffff;
        
        &:hover {
          color: #ffffff;
          background-color: rgba(255, 255, 255, 0.1);
      }
      }
      
      .el-dropdown-link {
        display: flex;
        align-items: center;
        cursor: pointer;
        color: #ffffff;
        transition: all 0.3s;
        
        &:hover {
          color: #ffffff;
          background-color: rgba(255, 255, 255, 0.1);
        }
      }
    }
  }
  
  h1 {
    margin: 0;
    font-size: 25px;
    font-weight: bold;
    color: #fefefe;
  }
  </style>
